      <fieldset>
	<legend>Pridanie terminu</legend>

  <?php
    /*foreach($field as $f){
        echo $f."<br>";
    } */
    
    //print_r($field);
    //echo $test['0'];

    echo form_open('admin/termin_validation');
    
    echo validation_errors();

    //TODO

    echo "<p><label>Udalosť: </label>";
    echo form_dropdown('udalost', $termin, $this->input->post('udalost'));
    echo "</p>";
    
    $optionsD = array(
                   '0'  => 'Pondelok',
                   '1'  => 'Utorok',
                   '2'  => 'Streda',
                   '3'  => 'Štvrtok',
                   '4'  => 'Piatok',
                 );
                 
    echo "<p><label>Deň: </label>";
    echo form_dropdown('den', $optionsD, $this->input->post('den'));
    echo "</p>";
    
    $options = array(
                   '07:00:00'    => '7:00',
                   '07:30:00'    => '7:30',
                   '08:00:00'    => '8:00',
                   '08:30:00'    => '8:30',
                   '09:00:00'   => '9:00',
                   '09:30:00'    => '9:30',
                   '10:00:00' => '10:00',
                   '10:30:00'    => '10:30',
                   '11:00:00'  => '11:00',
                   '11:30:00'  => '11:30',
                   '12:00:00'    => '12:00',
                   '12:30:00'  => '12:30',
                   '13:00:00'   => '13:00',
                   '13:30:00'  => '13:30',
                   '14:00:00' => '14:00',
                   '14:30:00'  => '14:30',
                   '15:00:00'  => '15:00',
                   '15:30:00'  => '15:30',
                   '16:00:00'    => '16:00',
                   '16:30:00'  => '16:30',
                   '17:00:00'   => '17:00',
                   '17:30:00'  => '17:30',
                   '18:00:00' => '18:00',
                   '18:30:00'  => '18:30',
                   '19:00:00' => '19:00',
                   '19:30:00'  => '19:30',
                   '20:00:00' => '20:00'
                 );
                     
    echo "<p><label>Čas od: </label>";
    echo form_dropdown('casOd', $options, $this->input->post('casOd'));
    
    echo "  <label class=\"short\">do: </label>";
    echo form_dropdown('casDo', $options, $this->input->post('casDo'));
    echo "</p>";
    
    echo "<p><label>Trvanie: </label>";
    echo form_input('trvanie', $this->input->post('trvanie'));
    echo "min</p>";
    
    $options2 = array(
                   '0'    => 'nie',
                   '1'    => 'áno',
                 );
    
    echo "<p><label>Fixný čas: </label>";
    echo form_dropdown('fixCas', $options2, $this->input->post('fixCas'));
    echo "</p>";
    
    echo "<p><label></label>";
    echo form_submit('termin_submit', 'Pridaj termín');
    echo "</p>";
    echo form_close();
  	echo "<p><label></label>";
	?><a href='<?php echo base_url()."main/members" ?>'><button>späť</button></a>
    </p>
  </fieldset>